/*
 ============================================================================
 Name		: TradeBlockSelBusinessHall.h
 Author	  : Zhang Jiawei
 Version	 : 1.0
 Copyright   : Your copyright notice
 Description : CTradeBlockSelBusinessHall declaration
 ============================================================================
 */

#ifndef TRADEBLOCKSELBUSINESSHALL_H
#define TRADEBLOCKSELBUSINESSHALL_H

// INCLUDES
#include "TradeBlock.h"
#include "TradeBlockNetwork.h"
#include "ListWidget.h"

// CLASS DECLARATION

class CTradeBlockSelBusinessHall: public CTradeBlock, public MWidgetObserver//, public MReqObserver
{
public:
    ~CTradeBlockSelBusinessHall();

    static CTradeBlockSelBusinessHall* NewL(CBaseBlock* bsBack = NULL);

    static CTradeBlockSelBusinessHall* NewLC(CBaseBlock* bsBack);
    
private:
    CTradeBlockSelBusinessHall(CBaseBlock* bsBack);

    void ConstructL();

public:
    void OnDraw(CFbsBitGc& g) const;

    void OnKeyDown(TInt keyCode);
    
    void OnMouseDown(const TPoint& aPt);
    
    void OnMouseMove(const TPoint& aPt);

    void OnMouseUp(const TPoint& aPt);

    void SizeChanged();    
    
    void ChangeFocus(TBool aFoucs, const TInt& keyCode);
    
    void BeforeBack();
    
public://MReqObserver
	TBool ProcessTradeNetworkMsg(TInt nError, TAny* p, const TDesC8& aBodyData);
	//TBool UpdateTradeNetwork(TInt nProgress);
	
protected:
    void AddTabs();

    void BeforeDraw(CFbsBitGc& g) const;  
    
private:
    void InitData();
    
public:
    // from MWidgetObserver
    void UpdateScreen();
    
    void SelectOneRow(TInt aRowIndex);
    
    void LoseFocus(const TInt& keycode);
    
private:
	enum TReqStatus
	{
		EReqStatus_None,
		EReqStatus_Broker,
		EReqStatus_Banch,
	};
    CListWidget* iList;
    TInt		iStatus;
};

#endif // TRADEBLOCKSELBUSINESSHALL_H
